package enums;

//定义一个枚举类型
public class Season {
    //声明属性 个数 类型 都由自己决定
    private final String seasonName;  // 季节名字
    private final String seasonDesc;    //季节描述信息

    //创建私有构造函数
    private Season(String seasonName, String seasonDesc) {
        this.seasonName = seasonName;
        this.seasonDesc = seasonDesc;
    }

    //创建四个对象
    public static final Season SPRING = new Season("春季", "万物复数的季节");
    public static final Season SUMMER = new Season("夏季", "夏天的季节");
    public static final Season AUTUMN = new Season("秋季", "秋天的思念");
    public static final Season WINTER = new Season("冬季", "禀冬以至");

    //获取静态对象中的属性的值
    public String getSeasonName() {
        return seasonName;
    }

    public String getSeasonDesc() {
        return seasonDesc;
    }

    public String toString() {
        return "Season{" +
                "seasonName='" + seasonName + '\'' +
                ", seasonDesc='" + seasonDesc + '\'' +
                '}';
    }
}
